package org.dtrd.modules.evaluation.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.evaluation.entity.po.DtrdEntEvaluationRdMmpi;

import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 明苏尼达多相个性评估
 * </p>
 *
 * @author QR
 * @since 2021-12-15
 */
@Getter
@Setter
@ApiModel(value = "明苏尼达多相个性评估详情")
public class MmpiDetail {

    private Integer dataId;


    private Integer patientId;

    private List<Integer> input;

    private Integer gender;

    private Float fqScore;

    private String fqLevel;

    private Float flScore;

    private String flLevel;

    private Float ffScore;

    private String ffLevel;

    private Float fkScore;

    private String fkLevel;

    private Float fhsScore;

    private String fhsLevel;

    private Float fdScore;

    private String fdLevel;

    private Float fhyScore;

    private String fhyLevel;

    private Float fpdScore;

    private String fpdLevel;

    private Float fmfmScore;

    private String fmfmLevel;

    private Float fmffScore;

    private String fmffLevel;

    private Float fpaScore;

    private String fpaLevel;

    private Float fptScore;

    private String fptLevel;

    private Float fscScore;

    private String fscLevel;

    private Float fmaScore;

    private String fmaLevel;

    private Float fsiScore;

    private String fsiLevel;

    private Float fmasScore;

    private String fmasLevel;

    private Float fdyScore;

    private String fdyLevel;

    private Float fdoScore;

    private String fdoLevel;

    private Float freScore;

    private String freLevel;

    private Float fcnScore;

    private String fcnLevel;

    private Date createTime;

    @ApiModelProperty("输出内容")
    private String output;

    public MmpiDetail parseFromPo(DtrdEntEvaluationRdMmpi po) {
        dataId = po.getDataId();
        patientId = po.getPatientId();
        String inputStr = po.getInput();
        this.input = Arrays.stream(inputStr.split(","))
                .map(Integer::parseInt)
                .collect(Collectors.toList());
        gender = po.getGender();
        fqScore = po.getFqScore();
        fqLevel = po.getFqLevel();
        flScore = po.getFlScore();
        flLevel = po.getFlLevel();
        ffScore = po.getFfScore();
        ffLevel = po.getFfLevel();
        fkScore = po.getFkScore();
        fkLevel = po.getFkLevel();
        fhsScore = po.getFhsScore();
        fhsLevel = po.getFhsLevel();
        fdScore = po.getFdScore();
        fdLevel = po.getFdLevel();
        fhyScore = po.getFhyScore();
        fhyLevel = po.getFhyLevel();
        fpdScore = po.getFpdScore();
        fpdLevel = po.getFpdLevel();
        fmfmScore = po.getFmfmScore();
        fmfmLevel = po.getFmfmLevel();
        fmffScore = po.getFmffScore();
        fmffLevel = po.getFmffLevel();
        fpaScore = po.getFpaScore();
        fpaLevel = po.getFpaLevel();
        fptScore = po.getFptScore();
        fptLevel = po.getFptLevel();
        fscScore = po.getFscScore();
        fscLevel = po.getFscLevel();
        fmaScore = po.getFmaScore();
        fmaLevel = po.getFmaLevel();
        fsiScore = po.getFsiScore();
        fsiLevel = po.getFsiLevel();
        fmasScore = po.getFmasScore();
        fmasLevel = po.getFmasLevel();
        fdyScore = po.getFdyScore();
        fdyLevel = po.getFdyLevel();
        fdoScore = po.getFdoScore();
        fdoLevel = po.getFdoLevel();
        freScore = po.getFreScore();
        freLevel = po.getFreLevel();
        fcnScore = po.getFcnScore();
        fcnLevel = po.getFcnLevel();
        output = po.getOutput();
        createTime = po.getCreateTime();
        return this;
    }
}
